import { defineStore } from 'pinia';

export const useArticleStore = defineStore('article', {
  state: () => ({
    trashArticles: [] // 存储回收站的文章
  }),
  actions: {
    // 添加到回收站
    moveToTrash(article) {
      this.trashArticles.push(article);
    },
    // 从回收站移除
    removeFromTrash(articleId) {
      this.trashArticles = this.trashArticles.filter(article => article.id !== articleId);
    }
  }
});